import request from '@/config/axios'

export interface HuaxingSmsVo {
  id: number
  memberUserId: number
  memberUserName: string
  msgContent: string
  msgTelphone: string
  sendTime: Date
  sendCount: number
  sendStatus: number
}

// 创建短信发送
export const createHuaxingSms = async (data: HuaxingSmsVo) => {
  return await request.post({
    url: '/zwsj/huaxing-sms/create',
    data: data
  })
}

// 重新发送短息
export const sendHuaxingSmsAgain = async (id: number) => {
  return await request.post({
    url: '/zwsj/huaxing-sms/send/' + id + '/again'
  })
}

// 删除短信发送
export const deleteHuaxingSms = async (id: number) => {
  return await request.delete({
    url: '/zwsj/huaxing-sms/delete?id=' + id
  })
}

// 获得短信发送
export const getHuaxingSms = async (id: number) => {
  return await request.get({
    url: '/zwsj/huaxing-sms/get?id=' + id
  })
}

// 获得短信发送分页
export const getHuaxingSmsPage = async (params: any) => {
  return await request.get({
    url: '/zwsj/huaxing-sms/page',
    params: params
  })
}
